package com.woniu.uums.controller;

import com.woniu.common.utils.PageData;
import com.woniu.common.utils.ResponseData;
import com.woniu.uums.dto.ZfPowerUserDto;
import com.woniu.uums.service.ZfPoweruserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: ECP
 * @description:
 * @create: 2024-11-23 11:55
 **/
@RestController
@RequestMapping("/uumsServer")
public class UumsController {
    @Autowired
    private ZfPoweruserService zfPoweruserService;

    /**
     * 对外提供信息接口
     */
    @PostMapping("/queryAll")
    public ResponseData<?> queryAll(@RequestBody PageData<ZfPowerUserDto> pageData) {
        return zfPoweruserService.queryAll(pageData);
    }

    /**
     * 对外提供信息接口
     */
    @PostMapping("/queryByCode")
    public ZfPowerUserDto queryByCode(@RequestParam("code") String code) {
        return zfPoweruserService.queryByCode(code);
    }

    /**
     * 对外提供信息接口
     */
    @PostMapping("/queryByRoleId")
    public ResponseData<?> queryByRoleId(@RequestParam("roleId") String roleId) {
        return zfPoweruserService.queryByRoleId(roleId);
    }
}